.class public final Lnbisdk/ev;
.super Ljava/lang/Object;

# interfaces
.implements Lcom/navbuilder/nb/a;


# instance fields
.field private d:Lnbisdk/ov;

.field private hn:Lnbisdk/ap;


# direct methods
.method public constructor <init>()V
    .locals 4

    const-wide/32 v2, 0x800000

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    invoke-static {v2, v3}, Lnbisdk/pn;->k(J)Lnbisdk/ov;

    move-result-object v0

    iput-object v0, p0, Lnbisdk/ev;->d:Lnbisdk/ov;

    :try_start_0
    const-string v0, "com_nim_maptilesourceinformation"

    const/4 v1, 0x1

    invoke-static {v0, v1}, Lnbisdk/ap;->b(Ljava/lang/String;Z)Lnbisdk/ap;

    move-result-object v0

    iput-object v0, p0, Lnbisdk/ev;->hn:Lnbisdk/ap;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    invoke-static {}, Lnbisdk/ix;->gN()Lnbisdk/ix;

    move-result-object v0

    invoke-virtual {v0, p0}, Lnbisdk/ix;->a(Lcom/navbuilder/nb/a;)V

    invoke-static {}, Lnbisdk/ix;->gN()Lnbisdk/ix;

    move-result-object v0

    const/16 v1, 0x15

    invoke-virtual {v0, v1}, Lnbisdk/ix;->au(I)I

    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v0

    const/4 v1, 0x2

    invoke-static {v0, v2, v3, v1}, Lnbisdk/pn;->a(Ljava/lang/String;JB)V

    invoke-direct {p0}, Lnbisdk/ev;->eB()V

    goto :goto_0
.end method

.method private Q(Ljava/lang/String;)I
    .locals 5

    const/4 v0, -0x1

    iget-object v1, p0, Lnbisdk/ev;->hn:Lnbisdk/ap;

    if-eqz v1, :cond_1

    :try_start_0
    iget-object v1, p0, Lnbisdk/ev;->hn:Lnbisdk/ap;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Lnbisdk/ap;->a(Lnbisdk/jt;)Lnbisdk/cl;

    move-result-object v1

    if-eqz v1, :cond_2

    :cond_0
    invoke-interface {v1}, Lnbisdk/cl;->cj()Z

    move-result v2

    if-eqz v2, :cond_1

    invoke-interface {v1}, Lnbisdk/cl;->ci()I

    move-result v2

    iget-object v3, p0, Lnbisdk/ev;->hn:Lnbisdk/ap;

    invoke-virtual {v3, v2}, Lnbisdk/ap;->B(I)[B

    move-result-object v3

    if-eqz v3, :cond_0

    array-length v4, v3

    if-lez v4, :cond_0

    invoke-direct {p0, v3}, Lnbisdk/ev;->g([B)Lnbisdk/jg;

    move-result-object v3

    invoke-virtual {v3}, Lnbisdk/jg;->getType()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v3, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v3

    if-eqz v3, :cond_0

    move v0, v2

    :cond_1
    :goto_0
    return v0

    :cond_2
    iget-object v1, p0, Lnbisdk/ev;->hn:Lnbisdk/ap;

    invoke-virtual {v1}, Lnbisdk/ap;->aK()I

    move-result v1

    const/4 v2, 0x1

    :goto_1
    if-gt v2, v1, :cond_1

    iget-object v3, p0, Lnbisdk/ev;->hn:Lnbisdk/ap;

    invoke-virtual {v3, v2}, Lnbisdk/ap;->B(I)[B

    move-result-object v3

    if-eqz v3, :cond_3

    array-length v4, v3

    if-lez v4, :cond_3

    invoke-direct {p0, v3}, Lnbisdk/ev;->g([B)Lnbisdk/jg;

    move-result-object v3

    invoke-virtual {v3}, Lnbisdk/jg;->getType()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v3, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result v3

    if-eqz v3, :cond_3

    move v0, v2

    goto :goto_0

    :cond_3
    add-int/lit8 v2, v2, 0x1

    goto :goto_1

    :catch_0
    move-exception v1

    iget-object v2, p0, Lnbisdk/ev;->d:Lnbisdk/ov;

    const-string v3, "MaptileSourceCache cannot be initizled"

    invoke-virtual {v2, v3}, Lnbisdk/ov;->ay(Ljava/lang/String;)V

    iget-object v2, p0, Lnbisdk/ev;->d:Lnbisdk/ov;

    invoke-virtual {v2, v1}, Lnbisdk/ov;->b(Ljava/lang/Throwable;)V

    goto :goto_0
.end method

.method private d(Lnbisdk/jg;)[B
    .locals 5

    const/4 v4, 0x1

    const/4 v0, 0x0

    if-eqz p1, :cond_0

    :try_start_0
    new-instance v1, Ljava/io/ByteArrayOutputStream;

    invoke-direct {v1}, Ljava/io/ByteArrayOutputStream;-><init>()V

    new-instance v2, Ljava/io/DataOutputStream;

    invoke-direct {v2, v1}, Ljava/io/DataOutputStream;-><init>(Ljava/io/OutputStream;)V

    invoke-virtual {p1}, Lnbisdk/jg;->getType()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/io/DataOutputStream;->writeUTF(Ljava/lang/String;)V

    invoke-virtual {p1}, Lnbisdk/jg;->getUrl()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/io/DataOutputStream;->writeUTF(Ljava/lang/String;)V

    invoke-virtual {p1}, Lnbisdk/jg;->hc()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/io/DataOutputStream;->writeUTF(Ljava/lang/String;)V

    invoke-virtual {p1}, Lnbisdk/jg;->hb()I

    move-result v3

    invoke-virtual {v2, v3}, Ljava/io/DataOutputStream;->writeInt(I)V

    invoke-virtual {p1}, Lnbisdk/jg;->cc()I

    move-result v3

    invoke-virtual {v2, v3}, Ljava/io/DataOutputStream;->writeInt(I)V

    invoke-virtual {p1}, Lnbisdk/jg;->gZ()I

    move-result v3

    invoke-virtual {v2, v3}, Ljava/io/DataOutputStream;->writeInt(I)V

    invoke-virtual {p1}, Lnbisdk/jg;->ha()I

    move-result v3

    invoke-virtual {v2, v3}, Ljava/io/DataOutputStream;->writeInt(I)V

    invoke-virtual {p1}, Lnbisdk/jg;->hd()Z

    move-result v3

    if-ne v3, v4, :cond_1

    move v3, v4

    :goto_0
    int-to-byte v3, v3

    invoke-virtual {v2, v3}, Ljava/io/DataOutputStream;->writeByte(I)V

    invoke-virtual {v2}, Ljava/io/DataOutputStream;->flush()V

    invoke-virtual {v1}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v0

    :cond_0
    :goto_1
    return-object v0

    :cond_1
    const/4 v3, 0x0

    goto :goto_0

    :catch_0
    move-exception v1

    iget-object v2, p0, Lnbisdk/ev;->d:Lnbisdk/ov;

    invoke-virtual {v2, v1}, Lnbisdk/ov;->b(Ljava/lang/Throwable;)V

    goto :goto_1
.end method

.method private eB()V
    .locals 4

    :try_start_0
    const-string v0, "com_nim_maptilesourceinformation"

    invoke-static {v0}, Lnbisdk/ap;->h(Ljava/lang/String;)V
    :try_end_0
    .catch Lnbisdk/an; {:try_start_0 .. :try_end_0} :catch_1
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    :try_start_1
    const-string v0, "com_nim_maptilesourceinformation"

    const/4 v1, 0x1

    invoke-static {v0, v1}, Lnbisdk/ap;->b(Ljava/lang/String;Z)Lnbisdk/ap;

    move-result-object v0

    iput-object v0, p0, Lnbisdk/ev;->hn:Lnbisdk/ap;
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    :goto_1
    return-void

    :catch_0
    move-exception v0

    const-wide/32 v1, 0x800000

    const/4 v3, 0x2

    invoke-static {v0, v1, v2, v3}, Lnbisdk/pn;->a(Ljava/lang/Throwable;JB)V

    goto :goto_1

    :catch_1
    move-exception v0

    goto :goto_0
.end method

.method private g([B)Lnbisdk/jg;
    .locals 13

    const/4 v3, 0x1

    :try_start_0
    new-instance v0, Ljava/io/ByteArrayInputStream;

    invoke-direct {v0, p1}, Ljava/io/ByteArrayInputStream;-><init>([B)V

    new-instance v12, Ljava/io/DataInputStream;

    invoke-direct {v12, v0}, Ljava/io/DataInputStream;-><init>(Ljava/io/InputStream;)V

    invoke-virtual {v12}, Ljava/io/DataInputStream;->readUTF()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v12}, Ljava/io/DataInputStream;->readUTF()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v12}, Ljava/io/DataInputStream;->readUTF()Ljava/lang/String;

    move-result-object v10

    invoke-virtual {v12}, Ljava/io/DataInputStream;->readInt()I

    move-result v8

    invoke-virtual {v12}, Ljava/io/DataInputStream;->readInt()I

    move-result v11

    invoke-virtual {v12}, Ljava/io/DataInputStream;->readInt()I

    move-result v6

    invoke-virtual {v12}, Ljava/io/DataInputStream;->readInt()I

    move-result v7

    invoke-virtual {v12}, Ljava/io/DataInputStream;->readByte()B

    move-result v0

    if-ne v0, v3, :cond_0

    move v5, v3

    :goto_0
    new-instance v0, Lnbisdk/jg;

    const-string v3, ""

    const-string v4, ""

    const-string v9, ""

    invoke-direct/range {v0 .. v11}, Lnbisdk/jg;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZIIILjava/lang/String;Ljava/lang/String;I)V

    invoke-virtual {v12}, Ljava/io/DataInputStream;->close()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_1
    return-object v0

    :cond_0
    const/4 v0, 0x0

    move v5, v0

    goto :goto_0

    :catch_0
    move-exception v0

    iget-object v1, p0, Lnbisdk/ev;->d:Lnbisdk/ov;

    invoke-virtual {v1, v0}, Lnbisdk/ov;->b(Ljava/lang/Throwable;)V

    const/4 v0, 0x0

    goto :goto_1
.end method


# virtual methods
.method public final P(Ljava/lang/String;)Lnbisdk/jg;
    .locals 5

    const/4 v4, 0x0

    iget-object v0, p0, Lnbisdk/ev;->hn:Lnbisdk/ap;

    if-eqz v0, :cond_4

    :try_start_0
    iget-object v0, p0, Lnbisdk/ev;->hn:Lnbisdk/ap;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lnbisdk/ap;->a(Lnbisdk/jt;)Lnbisdk/cl;

    move-result-object v0

    if-eqz v0, :cond_2

    :cond_0
    invoke-interface {v0}, Lnbisdk/cl;->cj()Z

    move-result v1

    if-eqz v1, :cond_1

    invoke-interface {v0}, Lnbisdk/cl;->ci()I

    move-result v1

    iget-object v2, p0, Lnbisdk/ev;->hn:Lnbisdk/ap;

    invoke-virtual {v2, v1}, Lnbisdk/ap;->B(I)[B

    move-result-object v1

    if-eqz v1, :cond_0

    array-length v2, v1

    if-lez v2, :cond_0

    invoke-direct {p0, v1}, Lnbisdk/ev;->g([B)Lnbisdk/jg;

    move-result-object v1

    invoke-virtual {v1}, Lnbisdk/jg;->getType()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v2, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_0

    move-object v0, v1

    :goto_0
    return-object v0

    :cond_1
    move-object v0, v4

    goto :goto_0

    :cond_2
    iget-object v0, p0, Lnbisdk/ev;->hn:Lnbisdk/ap;

    invoke-virtual {v0}, Lnbisdk/ap;->aK()I

    move-result v0

    const/4 v1, 0x1

    :goto_1
    if-gt v1, v0, :cond_4

    iget-object v2, p0, Lnbisdk/ev;->hn:Lnbisdk/ap;

    invoke-virtual {v2, v1}, Lnbisdk/ap;->B(I)[B

    move-result-object v2

    if-eqz v2, :cond_3

    array-length v3, v2

    if-lez v3, :cond_3

    invoke-direct {p0, v2}, Lnbisdk/ev;->g([B)Lnbisdk/jg;

    move-result-object v2

    invoke-virtual {v2}, Lnbisdk/jg;->getType()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v3, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result v3

    if-eqz v3, :cond_3

    move-object v0, v2

    goto :goto_0

    :cond_3
    add-int/lit8 v1, v1, 0x1

    goto :goto_1

    :catch_0
    move-exception v0

    iget-object v1, p0, Lnbisdk/ev;->d:Lnbisdk/ov;

    const-string v2, "MaptileSourceCache cannot be initizled"

    invoke-virtual {v1, v2}, Lnbisdk/ov;->ay(Ljava/lang/String;)V

    iget-object v1, p0, Lnbisdk/ev;->d:Lnbisdk/ov;

    invoke-virtual {v1, v0}, Lnbisdk/ov;->b(Ljava/lang/Throwable;)V

    :cond_4
    move-object v0, v4

    goto :goto_0
.end method

.method public final a(S)V
    .locals 0

    return-void
.end method

.method public final c(Lnbisdk/jg;)Z
    .locals 5

    const/4 v4, 0x0

    iget-object v0, p0, Lnbisdk/ev;->hn:Lnbisdk/ap;

    if-eqz v0, :cond_3

    invoke-virtual {p1}, Lnbisdk/jg;->getType()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Lnbisdk/ev;->P(Ljava/lang/String;)Lnbisdk/jg;

    move-result-object v0

    if-eqz v0, :cond_2

    invoke-virtual {v0}, Lnbisdk/jg;->hb()I

    move-result v0

    invoke-virtual {p1}, Lnbisdk/jg;->hb()I

    move-result v1

    if-eq v0, v1, :cond_0

    invoke-static {}, Lnbisdk/ie;->gx()V

    :cond_0
    invoke-virtual {p1}, Lnbisdk/jg;->getType()Ljava/lang/String;

    move-result-object v0

    invoke-direct {p0, v0}, Lnbisdk/ev;->Q(Ljava/lang/String;)I

    move-result v0

    if-ltz v0, :cond_1

    invoke-direct {p0, p1}, Lnbisdk/ev;->d(Lnbisdk/jg;)[B

    move-result-object v1

    if-eqz v1, :cond_1

    iget-object v2, p0, Lnbisdk/ev;->hn:Lnbisdk/ap;

    array-length v3, v1

    invoke-virtual {v2, v0, v1, v4, v3}, Lnbisdk/ap;->a(I[BII)V

    :cond_1
    :goto_0
    const/4 v0, 0x1

    :goto_1
    return v0

    :cond_2
    invoke-direct {p0, p1}, Lnbisdk/ev;->d(Lnbisdk/jg;)[B

    move-result-object v0

    if-eqz v0, :cond_1

    iget-object v1, p0, Lnbisdk/ev;->hn:Lnbisdk/ap;

    array-length v2, v0

    invoke-virtual {v1, v0, v4, v2}, Lnbisdk/ap;->a([BII)I

    goto :goto_0

    :cond_3
    move v0, v4

    goto :goto_1
.end method
